home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / text / edit / tecoc-146.lha / exertp.c < prev    next >
C/C++ Source or Header  |  1991-07-05  |  814b  |  30 lines

  1. /*****************************************************************************
  2.  
  3.     ExeRtP()
  4.  
  5.     This function executes a ) command.
  6.  
  7. *****************************************************************************/
  8.  
  9. #include "zport.h"        /* define portability identifiers */
  10. #include "tecoc.h"        /* define general identifiers */
  11. #include "defext.h"        /* define external global variables */
  12. #include "deferr.h"        /* define identifiers for error messages */
  13.  
  14. DEFAULT ExeRtP()        /* execute right parenthesis command */
  15. {
  16.     DBGFEN(1,"ExeRtP",NULL);
  17.  
  18. /*
  19.  * if no numeric arg.  or not a number
  20.  */
  21.     if ((EStTop == EStBot) || (EStack[EStTop].ElType != OPERAND)) {
  22.         ErrMsg(ERR_NAP);        /* no argument before ) */
  23.         DBGFEX(1,DbgFNm,"FAILURE");
  24.         return FAILURE;
  25.     }
  26.  
  27.     DBGFEX(1,DbgFNm,"PushEx(')')");
  28.     return PushEx((LONG)')', OPERATOR);
  29. }
  30.